<!DOCTYPE html>












  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.1" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png?v=6.4.1">


  <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png?v=6.4.1">


  <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png?v=6.4.1">


  <link rel="mask-icon" href="/favicon/safari-pinned-tab.svg?v=6.4.1" color="#222">


  <link rel="manifest" href="/favicon/site.webmanifest">


  <meta name="msapplication-config" content="/favicon/browserconfig.xml" />







<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '6.4.1',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":true},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="瞎几把记一点Windows小知识">
<meta name="keywords" content="powershell">
<meta property="og:type" content="article">
<meta property="og:title" content="Windows-log">
<meta property="og:url" content="http://blog.d2x3.cn/Windows-log.html">
<meta property="og:site_name" content="瞎几把XI[U]E">
<meta property="og:description" content="瞎几把记一点Windows小知识">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://blog.d2x3.cn/Windows-log/1.png">
<meta property="og:updated_time" content="2018-09-19T04:59:03.056Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Windows-log">
<meta name="twitter:description" content="瞎几把记一点Windows小知识">
<meta name="twitter:image" content="http://blog.d2x3.cn/Windows-log/1.png">






  <link rel="canonical" href="http://blog.d2x3.cn/Windows-log.html"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>Windows-log | 瞎几把XI[U]E</title>
  




<script async src="https://www.googletagmanager.com/gtag/js?id=UA-100758199-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-100758199-1');
</script>






  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">瞎几把XI[U]E</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <h1 class="site-subtitle" itemprop="description">XIA几把学</h1>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />标签<span class="badge">24</span></a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />分类<span class="badge">8</span></a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档<span class="badge">16</span></a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-sitemap">
    <a href="/sitemap.xml" rel="section">
      <i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br />站点地图</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-mikutap">
    <a href="/mikutap/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-music"></i> <br />mikutap</a>
  </li>

      
      
    </ul>
  

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://blog.d2x3.cn/Windows-log.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="dzxs">
      <meta itemprop="description" content="没有什么是一成不变的，一切[D:\\AV\\]都在变化">
      <meta itemprop="image" content="https://avatars2.githubusercontent.com/u/6087117?s=460&v=4">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="瞎几把XI[U]E">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">Windows-log
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-09-14 15:36:42" itemprop="dateCreated datePublished" datetime="2018-09-14T15:36:42+08:00">2018-09-14</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-09-19 12:59:03" itemprop="dateModified" datetime="2018-09-19T12:59:03+08:00">2018-09-19</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Windows/" itemprop="url" rel="index"><span itemprop="name">Windows</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <blockquote class="blockquote-center"><p>瞎几把记一点Windows小知识</p>
</blockquote>
<a id="more"></a>
<h2 id="scoop"><a href="#scoop" class="headerlink" title="scoop"></a>scoop</h2><p> <a href="https://github.com/lukesampson/scoop" target="_blank" rel="noopener">https://github.com/lukesampson/scoop</a></p>
<p>windows 的命令行安装程序管理工具</p>
<h3 id="scoop-dzxs"><a href="#scoop-dzxs" class="headerlink" title="scoop-dzxs"></a>scoop-dzxs</h3><p>我的bucket <a href="https://github.com/dzxs/scoop-dzxs" target="_blank" rel="noopener">https://github.com/dzxs/scoop-dzxs</a></p>
<h4 id="安装-scoop-到自定义目录"><a href="#安装-scoop-到自定义目录" class="headerlink" title="安装 scoop 到自定义目录"></a>安装 scoop 到自定义目录</h4><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[environment]::setEnvironmentVariable(<span class="string">'SCOOP'</span>,<span class="string">'D:\Applications\Scoop'</span>,<span class="string">'User'</span>)</span><br><span class="line"><span class="variable">$env:SCOOP</span>=<span class="string">'D:\Applications\Scoop'</span></span><br><span class="line">iex (<span class="built_in">new-object</span> net.webclient).downloadstring(<span class="string">'https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1'</span>)</span><br></pre></td></tr></table></figure>
<h4 id="添加scoop-dzxs"><a href="#添加scoop-dzxs" class="headerlink" title="添加scoop-dzxs"></a>添加scoop-dzxs</h4><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">scoop bucket add dzxs https://github.com/dzxs/scoop-dzxs</span><br><span class="line">scoop bucket list <span class="comment"># -&gt; you should see 'dzxs'</span></span><br></pre></td></tr></table></figure>
<h4 id="记一下"><a href="#记一下" class="headerlink" title="记一下"></a>记一下</h4><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">scoop cache rm * <span class="comment"># 清空所有缓存</span></span><br><span class="line">scoop cleanup * <span class="comment"># 删除所有app的旧版本</span></span><br></pre></td></tr></table></figure>
<h2 id="powershell"><a href="#powershell" class="headerlink" title="powershell"></a>powershell</h2><h3 id="Invoke-WebRequest-下载文件"><a href="#Invoke-WebRequest-下载文件" class="headerlink" title="Invoke-WebRequest 下载文件"></a>Invoke-WebRequest 下载文件</h3><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">Invoke-WebRequest</span> -Uri https://gist.githubusercontent.com/dzxs/f78262f38190cc499540f12d5c245822/raw/<span class="number">37</span>abe4b11d08590282b16aae55096bdbeae0faf5/OpenWithSublimeText3.bat -OutFile OpenWithSublimeText3.bat</span><br><span class="line"></span><br><span class="line">$ scoop install sudo <span class="comment">#类似linux下的sudo</span></span><br><span class="line">Installing <span class="string">'sudo'</span> (<span class="number">0.2017</span>.<span class="number">03.24</span>) [<span class="number">64</span>bit]</span><br><span class="line">sudo.ps1 (<span class="number">2.0</span> KB) [===========================================================================================] <span class="number">100</span>%</span><br><span class="line">Checking hash of sudo.ps1 ... ok.</span><br><span class="line">Linking D:\apps\Scoop\apps\sudo\current =&gt; D:\apps\Scoop\apps\sudo\<span class="number">0.2017</span>.<span class="number">03.24</span></span><br><span class="line">Creating shim <span class="keyword">for</span> <span class="string">'sudo'</span>.</span><br><span class="line"><span class="string">'sudo'</span> (<span class="number">0.2017</span>.<span class="number">03.24</span>) was installed successfully!</span><br><span class="line"></span><br><span class="line">$ sudo .\OpenWithSublimeText3.bat</span><br><span class="line">操作成功完成。</span><br><span class="line">操作成功完成。</span><br><span class="line">操作成功完成。</span><br><span class="line">操作成功完成。</span><br><span class="line">操作成功完成。</span><br><span class="line">操作成功完成。</span><br><span class="line">请按任意键继续. . .</span><br></pre></td></tr></table></figure>
<p>这个下载的文件可以将sublime-text添加到右键</p>
<img src="/Windows-log/1.png">

      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/powershell/" rel="tag"># powershell</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/winre.html" rel="next" title="恢复winre">
                <i class="fa fa-chevron-left"></i> 恢复winre
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/Windows安装Linux子系统.html" rel="prev" title="Windows安装Linux子系统">
                Windows安装Linux子系统 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="https://avatars2.githubusercontent.com/u/6087117?s=460&v=4"
                alt="dzxs" />
            
              <p class="site-author-name" itemprop="name">dzxs</p>
              <p class="site-description motion-element" itemprop="description">没有什么是一成不变的，一切[D:\\AV\\]都在变化</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">16</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">8</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">24</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/dzxs" target="_blank" title="GitHub" rel="external nofollow"><i class="fa fa-fw fa-github"></i>GitHub</a>
                  
                </span>
              
            </div>
          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#scoop"><span class="nav-number">1.</span> <span class="nav-text">scoop</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#scoop-dzxs"><span class="nav-number">1.1.</span> <span class="nav-text">scoop-dzxs</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装-scoop-到自定义目录"><span class="nav-number">1.1.1.</span> <span class="nav-text">安装 scoop 到自定义目录</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#添加scoop-dzxs"><span class="nav-number">1.1.2.</span> <span class="nav-text">添加scoop-dzxs</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#记一下"><span class="nav-number">1.1.3.</span> <span class="nav-text">记一下</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#powershell"><span class="nav-number">2.</span> <span class="nav-text">powershell</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Invoke-WebRequest-下载文件"><span class="nav-number">2.1.</span> <span class="nav-text">Invoke-WebRequest 下载文件</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 – <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-code"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">dzxs</span>

  

  
</div>


  










        








        
      </div>
    </footer>

    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.1"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.4.1"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.4.1"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.1"></script>



  



  










  





  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  
  

  

  
  <script type="text/javascript" src="/js/src/js.cookie.js?v=6.4.1"></script>
  <script type="text/javascript" src="/js/src/scroll-cookie.js?v=6.4.1"></script>


  

  

  

</body>
</html>
